package com.sirdc.modules.paas.api.common;

import java.io.Serializable;

/**
 * 公共请求类.
 * 
 * @author Qing
 * @e-mail lhq@suncco.com
 * @version v1.0
 * @copyright 2010-2015
 * @create-time 2013-9-18 下午5:30:26
 * 
 */
public class CommonRequest implements Serializable {

	private static final long serialVersionUID = -1045004324858661442L;
	
	/**
	 * 应用编码.
	 */
	protected String appCode;
	/**
	 * 应用密钥.
	 */
	protected String appKey;
	
	/**
	 * 请求调用的URL.
	 */
	protected String url = Constants.DEFAULT_URL;
	
	/**
	 * 连接请求超时时间.
	 */
	protected int connectTimeout = Constants.CONNECT_TIMEOUT;

	/**
	 * 读取请求返回数据超时时间.
	 */
	protected int readTimeout = Constants.READ_TIMEOUT;
	
	/**
	 * 字符集.
	 */
	protected String charset = Constants.CHARSET;
	
	/**
	 * 动态设置调用URL地址的构造方法.
	 * @param appCode 应用编码.
	 * @param appKey 应用密钥.
	 * @param url 调用URL地址.
	 */
	public CommonRequest(String appCode, String appKey, String url) {
		this.appCode = appCode;
		this.appKey = appKey;
		this.url = url;
	}

	public String getAppCode() {
		return appCode;
	}

	public void setAppCode(String appCode) {
		this.appCode = appCode;
	}

	public String getAppKey() {
		return appKey;
	}

	public void setAppKey(String appKey) {
		this.appKey = appKey;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public int getConnectTimeout() {
		return connectTimeout;
	}

	public void setConnectTimeout(int connectTimeout) {
		this.connectTimeout = connectTimeout;
	}

	public int getReadTimeout() {
		return readTimeout;
	}

	public void setReadTimeout(int readTimeout) {
		this.readTimeout = readTimeout;
	}

	public String getCharset() {
		return charset;
	}

	public void setCharset(String charset) {
		this.charset = charset;
	}

}
